/*###################################################################*
#
# MP (Mitchell Pell) Base - CrossPlatform Base Utilities.
# Copyright (C) 2013  Mitchell Pell
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
####################################################################*/

#ifndef BASE_HAS_HEADER_H_
#define BASE_HAS_HEADER_H_

#define NULL 0

namespace mp_base
{
	typedef unsigned int uint;

	template <class T>
	class HasHeader
	{
	public:
		HasHeader()
			 {m_header = NULL; m_headerSize = 0;}
		virtual ~HasHeader(){delete [] m_header;}

		void Header(T* header, uint size)
			{m_header = header; m_headerSize = size;}
		void Header(T* header){m_header = header;}
		void HeaderSize(uint size){m_headerSize = size;}

		const uint HeaderSize(){return m_headerSize;}
		const char* Header(){return m_header;}

	private:
		T*		m_header;
		uint	m_headerSize;
	};
}

#endif